#include "stack.h"

Elenemt_data data[10] = 
{
    {.name = "唐三" , .sex = "男" , .age = 18 , .id = 1 , .sco = 60} , 
    {.name = "萧炎" , .sex = "男" , .age = 18 , .id = 2 , .sco = 60} , 
    {.name = "小舞" , .sex = "男" , .age = 18 , .id = 3 , .sco = 60} , 
    {.name = "牧尘" , .sex = "男" , .age = 18 , .id = 4 , .sco = 60} , 
    {.name = "熏儿" , .sex = "男" , .age = 18 , .id = 5 , .sco = 60} ,
    {.name = "张三" , .sex = "男" , .age = 18 , .id = 5 , .sco = 60} ,
};

void stack_func(void)
{
    //创建栈
    SqStack *sql_S;
    Init_Stack(&sql_S);
    //入栈
    for (size_t i = 0; i < 6; i++)
    {
        Push_Stack(sql_S,data[i]);
    }
    //出栈 读取栈
    for (size_t i = 0; i < 6; i++)
    {
        Get_Top(sql_S,NULL);
        Pop_Stack(sql_S);
    }
    //销毁栈
    Destroy_Stack(&sql_S);
}
int main(void)
{
    stack_func();
    return 0;
}